No $r = no mod_perl?

No $r = no mod_perl?

am 10.07.2011 12:08:20 von Tosh Cooey

So I'm following your advice and going the easy route of apt-get everything.

My original server had this config:
Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server

And two years later we're at:
Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server

Is that really the state of two years of progress in apt-get packages,
or did I choose the wrong repository?

And so after copying over configs and startups I'm getting this error:

Can't call method "auth_name" on an undefined value at
/usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.

Which is: my $auth_name = $r->auth_name;

So the fact that $r is undefined tells me that whatever is running is
NOT running under mod_perl, is this a valid assessment?

Because right now I will have to get into a fight with my sys-admin who
will say it's not working because I didn't configure something
correctly, but my position is if he apt-gets everything and then copies
over the config/startup from the old (working) install then everything
*should* work so he's probably left out something.

Do you see now why I would prefer to work with a PaaS instead of admins,
I don't want to have to deal with this, I just want to write apps.

Thanks!

Tosh

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

Re: No $r = no mod_perl?

am 10.07.2011 17:50:02 von Adam Prime

On 7/10/2011 6:08 AM, Tosh Cooey wrote:
> So I'm following your advice and going the easy route of apt-get
> everything.
>
> My original server had this config:
> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>
> And two years later we're at:
> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>
> Is that really the state of two years of progress in apt-get packages,
> or did I choose the wrong repository?
>
> And so after copying over configs and startups I'm getting this error:
>
> Can't call method "auth_name" on an undefined value at
> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>
> Which is: my $auth_name = $r->auth_name;
>
> So the fact that $r is undefined tells me that whatever is running is
> NOT running under mod_perl, is this a valid assessment?
>
> Because right now I will have to get into a fight with my sys-admin who
> will say it's not working because I didn't configure something
> correctly, but my position is if he apt-gets everything and then copies
> over the config/startup from the old (working) install then everything
> *should* work so he's probably left out something.

This does sounds like something in the config didn't get copied over. I
believe your stuff runs as registry/perlrun scripts, so that would be
the configuration that's missing.

Adam

Re: No $r = no mod_perl?

am 10.07.2011 19:09:16 von Hendrik Schumacher

Maybe you are using the wrong sethandler value for your application, check

http://perl.apache.org/docs/2.0/user/config/config.html#C_Gl obalRequest_

If you are using a global $r variable you should specify

SetHandler perl-script

and not

SetHandler modperl

Using the latter you get the $r variable as an argument to your handler-sub.

Hendrik

Am So, 10.07.2011, 12:08 schrieb Tosh Cooey:
> So I'm following your advice and going the easy route of apt-get
> everything.
>
> My original server had this config:
> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>
> And two years later we're at:
> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>
> Is that really the state of two years of progress in apt-get packages,
> or did I choose the wrong repository?
>
> And so after copying over configs and startups I'm getting this error:
>
> Can't call method "auth_name" on an undefined value at
> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>
> Which is: my $auth_name = $r->auth_name;
>
> So the fact that $r is undefined tells me that whatever is running is
> NOT running under mod_perl, is this a valid assessment?
>
> Because right now I will have to get into a fight with my sys-admin who
> will say it's not working because I didn't configure something
> correctly, but my position is if he apt-gets everything and then copies
> over the config/startup from the old (working) install then everything
> *should* work so he's probably left out something.
>
> Do you see now why I would prefer to work with a PaaS instead of admins,
> I don't want to have to deal with this, I just want to write apps.
>
> Thanks!
>
> Tosh
>
> --
> McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
>

Re: No $r = no mod_perl?

am 10.07.2011 19:29:50 von Matisse Enzer

--Boundary_(ID_oTP5VRlcqaub01NnhZ6KEw)
Content-type: text/plain; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT

Do you have a configuration similar to this in httpd.conf:




AuthType Apache2::AuthCookieDBI
AuthName WhatEver
PerlAuthenHandler Apache2::AuthCookieDBI->authenticate
PerlAuthzHandler Apache2::AuthCookieDBI->authorize
require valid-user
# or you can require users:
require user jacob
# You can optionally require groups.
require group system




On Jul 10, 2011, at 8:50 AM, Adam Prime wrote:

> On 7/10/2011 6:08 AM, Tosh Cooey wrote:
>> So I'm following your advice and going the easy route of apt-get
>> everything.
>>
>> My original server had this config:
>> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>>
>> And two years later we're at:
>> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>>
>> Is that really the state of two years of progress in apt-get packages,
>> or did I choose the wrong repository?
>>
>> And so after copying over configs and startups I'm getting this error:
>>
>> Can't call method "auth_name" on an undefined value at
>> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>>
>> Which is: my $auth_name = $r->auth_name;
>>
>> So the fact that $r is undefined tells me that whatever is running is
>> NOT running under mod_perl, is this a valid assessment?
>>
>> Because right now I will have to get into a fight with my sys-admin who
>> will say it's not working because I didn't configure something
>> correctly, but my position is if he apt-gets everything and then copies
>> over the config/startup from the old (working) install then everything
>> *should* work so he's probably left out something.
>
> This does sounds like something in the config didn't get copied over. I believe your stuff runs as registry/perlrun scripts, so that would be the configuration that's missing.
>
> Adam
>
>

--Boundary_(ID_oTP5VRlcqaub01NnhZ6KEw)
Content-type: text/html; CHARSET=US-ASCII
Content-transfer-encoding: quoted-printable

Do you have a configuration similar to t=
his in httpd.conf:


ple-style-span" style=3D"font-family: arial, sans-serif; -webkit-tap-highlig=
ht-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(1=
75, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180,=
0.230469); font-size: medium; ">
"background-image: initial; background-attachment: initial; background-origi=
n: initial; background-clip: initial; background-color: rgb(238, 238, 238); b=
order-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; bor=
der-left-width: 1px; border-top-style: solid; border-right-style: solid; bor=
der-bottom-style: solid; border-left-style: solid; border-top-color: rgb(136=
, 136, 136); border-right-color: rgb(136, 136, 136); border-bottom-color: rg=
b(136, 136, 136); border-left-color: rgb(136, 136, 136); color: rgb(0, 0, 0)=
; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1=
em; white-space: pre; font-weight: normal; font-style: normal; background-po=
sition: initial initial; background-repeat: initial initial; ">
mal; font-style: normal; "><Directory /www/domain.com/authcookiedbi> span>
AuthType Apache2::AuthCookieDBI
AuthName WhatEver
PerlAuthenHandler Apache2::AuthCook=
ieDBI->authenticate
PerlAuthzHandler Apache2::AuthCooki=
eDBI->authorize
: normal; font-style: normal; ">require valid ">-user
: normal; font-style: normal; "># or you can require users:
: normal; font-style: normal; ">require user jacob
: normal; font-style: normal; "># You can optionally require groups.
: normal; font-style: normal; ">require group rd" style=3D"color: rgb(0, 0, 0); font-weight: normal; font-style: normal; "=
>system

mal; font-style: normal; "></Directory>
ht: normal; font-style: normal; ">


>On Jul 10, 2011, at 8:50 AM, Adam Prime < oronto.ca">adam.prime@utoronto.ca> wrote:

ockquote type=3D"cite">
On 7/10/2011 6:08 AM, Tosh Cooey wrote: pan>
So I'm following your advice and goi=
ng the easy route of apt-get

">everything.
<=
/span>
My original server ha=
d this config:

Apache=
/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server

<=
blockquote type=3D"cite">
ite">And two years later we're at:
ype=3D"cite">Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server=


ote>
Is that really the state of two years of=
progress in apt-get packages,

te">or did I choose the wrong repository?
kquote type=3D"cite">
>And so after copying over configs and startups I'm getting this error=
:


uote>
Can't call method "auth_name" on an und=
efined value at

/usr/=
local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.

quote>

pe=3D"cite">Which is: my $auth_name =3D $r->auth_name;
blockquote>

te type=3D"cite">So the fact that $r is undefined tells me that whatev=
er is running is

NOT r=
unning under mod_perl, is this a valid assessment?

lockquote type=3D"cite">
te">Because right now I will have to get into a fight with my sys-admi=
n who

will say it's n=
ot working because I didn't configure something

kquote type=3D"cite">correctly, but my position is if he apt-gets ever=
ything and then copies

n>over the config/startup from the old (working) install then everything an>
*should* work so he's pr=
obably left out something.


Thi=
s does sounds like something in the config didn't get copied over.  I b=
elieve your stuff runs as registry/perlrun scripts, so that would be the con=
figuration that's missing.


Adam
<=
span>


=

--Boundary_(ID_oTP5VRlcqaub01NnhZ6KEw)--

Re: No $r = no mod_perl?

am 10.07.2011 21:30:00 von Tosh Cooey

Sorry, false alarm... I had subclassed Apache2::AuthCookieDBI 2.12 and
had to do things like this:

*Apache2::AuthCookieDBI::_dbi_connect = sub {

since Apache2::AuthCookieDBI wasn't very subclassable, and with the
upgrade to a very nice Apache2::AuthCookieDBI 2.14 my whatever I did up
there broke things.

I guess I owe my admin a beer.

Tosh


On 7/10/11 7:09 PM, Hendrik Schumacher wrote:
> Maybe you are using the wrong sethandler value for your application, check
>
> http://perl.apache.org/docs/2.0/user/config/config.html#C_Gl obalRequest_
>
> If you are using a global $r variable you should specify
>
> SetHandler perl-script
>
> and not
>
> SetHandler modperl
>
> Using the latter you get the $r variable as an argument to your handler-sub.
>
> Hendrik
>
> Am So, 10.07.2011, 12:08 schrieb Tosh Cooey:
>> So I'm following your advice and going the easy route of apt-get
>> everything.
>>
>> My original server had this config:
>> Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
>>
>> And two years later we're at:
>> Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
>>
>> Is that really the state of two years of progress in apt-get packages,
>> or did I choose the wrong repository?
>>
>> And so after copying over configs and startups I'm getting this error:
>>
>> Can't call method "auth_name" on an undefined value at
>> /usr/local/share/perl/5.10.1/Apache2/AuthCookieDBI.pm line 284.
>>
>> Which is: my $auth_name = $r->auth_name;
>>
>> So the fact that $r is undefined tells me that whatever is running is
>> NOT running under mod_perl, is this a valid assessment?
>>
>> Because right now I will have to get into a fight with my sys-admin who
>> will say it's not working because I didn't configure something
>> correctly, but my position is if he apt-gets everything and then copies
>> over the config/startup from the old (working) install then everything
>> *should* work so he's probably left out something.
>>
>> Do you see now why I would prefer to work with a PaaS instead of admins,
>> I don't want to have to deal with this, I just want to write apps.
>>
>> Thanks!
>>
>> Tosh
>>
>> --
>> McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
>>
>
>
>

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/